package sharepas.gui.shell;

import sharepas.nf.SharePasNf;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author yaiba
 */
public class main {
 /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        String option = null;
        String dns = null;

        SharePasNf sharePas = new SharePasNf();

        int i =0;
        for(String arg:args){
            if( arg.equalsIgnoreCase("-server") ){
                sharePas.runServer();
            System.exit(0);
            }else if( arg.equalsIgnoreCase("-client")){
                if( i+1 < args.length ){
                    dns = args[i+1];
                }else{
                    dns = "localhost";
                }
                sharePas.runClient(dns);

                System.exit(0);
            }

            i++;
        }

    }
}
